<template>
    <a-carousel arrows>
        <div
                slot="prevArrow"
                class="custom-slick-arrow"
                style="left: 10px;zIndex: 1"
        >
            <a-icon type="left-circle" />
        </div>
        <div slot="nextArrow" class="custom-slick-arrow" style="right: 10px">
            <a-icon type="right-circle" />
        </div>
        <div class="swiperImg" v-for="(item,index) in Arr" :key="index" :style="{'background-image':'url('+item.imgUrlPc+')','height':'300px'}"></div>
    </a-carousel>
</template>

<!--<script>-->
<!--    export default {autoplay:true};-->
<!--</script>-->

<script>
    export default {
        name: "Swiper",
        autoplay:true,
        data(){
            return{
                Arr:[],
            }
        },
        created() {
            this.$axios.get("http://wkt.myhope365.com/weChat/applet/course/banner/list?number=5").then((res)=>{
                this.Arr = res.data.data
            })
        }
    }
</script>

<style scoped>
    .ant-carousel >>> .slick-slide {
        text-align: center;
        height: 300px;
        line-height: 160px;
        background: #364d79;
        overflow: hidden;
    }

    .ant-carousel >>> .custom-slick-arrow {
        width: 25px;
        height: 25px;
        font-size: 25px;
        color: #fff;
        background-color: rgba(31, 45, 61, 0.11);
        opacity: 0.3;
    }
    .ant-carousel >>> .custom-slick-arrow:before {
        display: none;
    }
    .ant-carousel >>> .custom-slick-arrow:hover {
        color: white;
    }
    .ant-carousel >>> .slick-slide h3 {
        color: #fff;
    }
    .swiperImg{
        background-repeat: no-repeat;
        background-size: cover;
        background-position: center;
    }
</style>